Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
React Native Calendar devuelve {"_U":0,"_V":0,"_W":null,"_X":null}, sin esperar una promesa

Estoy usando expo-calendar y recuperando un objeto de calendarios del dispositivo de un usuario.

Después de recibir los calendarios, estoy usando el calendario para recuperar los eventos de los calendarios individuales.

Al solicitar los eventos, recibo {"_U":0,"_V":0,"_W":null,"_X":null} cuando registro los datos del evento solicitado.

Junto con esto, recibo el error: [Unhandled promise rejection: Error: An exception was thrown while calling `ExpoCalendar.getEventsAsync` with arguments `(] at node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:103:50 in promiseMethodWrapper at node_modules/@unimodules/react-native-adapter/build/NativeModulesProxy.native.js:15:23 in moduleName.methodInfo.name at http://127.0.0.1:19000/index.bundle?platform=ios&dev=true&hot=false&minify=false:321320:82 in getEventsAsync$ at Screens/Tasks_1.js:1018:15 in <global>

Creo que esto se debe a que la solicitud const events = Calendar.getEventsAsync() está esperando una promesa, pero no puedo determinar qué respuesta está esperando. ¿Cómo puedo acceder correctamente a los eventos?

 useEffect(() => { (async () => { //REQUEST PERMISSION TO ACCESS CALENDAR const { status } = await Calendar.requestCalendarPermissionsAsync(); if (status === "granted") { const calendars = await Calendar.getCalendarsAsync( Calendar.EntityTypes.EVENT ); //LIST OF ALL CALENDARS ON DEVICE WITH ID's console.log("Here are all your calendars:"); console.log({ calendars }); //GET EVENTS FROM A CALENDAR ON DEVICE WITH A GIVEN ID AND TIME RANGE const events = Calendar.getEventsAsync( calIDs, "2021-04-14T17:00:00.00Z", "2021-09-14T17:00:00.00Z" ); //THIS LOGS {"_U":0,"_V":0,"_W":null,"_X":null} console.log("EVENTS" + JSON.stringify(events)); } })(); }, []);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

{"_U":0,"_V":0,"_W":null,"_X":null} ¡Esto probablemente sucede porque no agregó la palabra clave await antes de Calendar.getEventsAsync !

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!